package com.wc.alorithm_blue_bridge._字符串.Q3160;

import java.io.*;
/**
 * @Author congege
 * @Description
 *
 * boarder
 * https://www.lanqiao.cn/problems/3160/learning/?page=1&first_category_id=1
 * @Date Created in 2023/12/1-10:38
 */
public class Main {
    private static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    private static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    public static void main(String[] args) {
        String s = nextLine();
        int ans = 1;
        boolean flg = false;
        assert s != null;
        int len = s.length();
        // 暴力判断
        // 测试一字符，两个字符，到n个字符，是否满足
        for(int i = 1; i <= len; i++){
            String compare = s.substring(0,i);
            if(len % i != 0){
                continue;
            }
            flg = true;
            for(int j = i; j + i<= len; j+=i){
                if(!compare.equals(s.substring(j,j + i))){
                    flg = false;
                    break;
                }
            }
            if(flg){
                ans = len / i;
                break;
            }
        }
        System.out.println(ans);
    }

    private static String nextLine(){
        String s = null;
        try{
            s = in.readLine();
        } catch (Exception e){
            return null;
        }
        return s;
    }
}
